package Thread.Callable;

import java.util.concurrent.*;

public class Main {
    public static void main(String[] args) throws Exception {
        ExecutorService executor = Executors.newFixedThreadPool(5);
        Callable<String> task = new MyThreaad();
        Future<String> future = executor.submit(task);
        String result = future.get();
        System.out.println(result);
    }
}
class MyThreaad implements Callable<String> {
    @Override
    public String call() throws Exception {
        return "Hello World";
    }
}